package dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import entity.Reservation;
import entity.example.ReservationExample;

public interface ReservationMapper {
    long countByExample(ReservationExample example);

    int deleteByExample(ReservationExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Reservation record);

    int insertSelective(Reservation record);

    List<Reservation> selectByExample(ReservationExample example);

    List<Reservation> selectByUsername(String username);

    Reservation selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Reservation record, @Param("example") ReservationExample example);

    int updateByExample(@Param("record") Reservation record, @Param("example") ReservationExample example);

    int updateByPrimaryKeySelective(Reservation record);

    int updateByPrimaryKey(Reservation record);

    /**
     * 选取所有未审核的预约申请，包含教室信息、教学楼信息、预约时间段和用户
     *
     * @return
     */
    List<Reservation> selectNotAuditedReservation();
    /**
     * 选取所有已审核的预约申请，包含教室信息、教学楼信息、预约时间段和用户
     *
     * @return
     */
    List<Reservation> selectAuditedReservation();
}